package com.example.experminent3;

import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.NotificationCompat;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class MainActivity extends AppCompatActivity {

    private Button btnListFunction;
    private Button btnDialogFunction;
    private Button btnMenuFunction;
    private Button btnActionModeFunction;

    @SuppressLint("MissingInflatedId")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // 初始化按钮
        btnListFunction = findViewById(R.id.btn_list_function);
        btnDialogFunction = findViewById(R.id.btn_dialog_function);
        btnMenuFunction = findViewById(R.id.btn_menu_function);
        btnActionModeFunction = findViewById(R.id.btn_action_mode_function);

        // 列表功能入口
        btnListFunction.setOnClickListener(v -> {
            Intent intent = new Intent(MainActivity.this, ListActivity.class);
            startActivity(intent);
        });

        // 对话框功能入口
        btnDialogFunction.setOnClickListener(v -> {
            Intent intent = new Intent(MainActivity.this, DialogActivity.class);
            startActivity(intent);
        });

        // 菜单功能入口
        btnMenuFunction.setOnClickListener(v -> {
            Intent intent = new Intent(MainActivity.this, MenuActivity.class);
            startActivity(intent);
        });

        // 其他功能（预留）
        btnActionModeFunction.setOnClickListener(v -> {
            Intent intent = new Intent(MainActivity.this, ActionModeActivity.class);
            startActivity(intent);
        });
    }
}